package lab02.test4;
public class Staff {
    private String name;
    private String num;
    private int pay;
    private double worktime;
    private int addpay=0;

    public Staff() {

    }
    public Staff(String name, String num, int pay,double worktime) {
        this.name = name;
        this.num = num;
        this.pay = pay;
        this.worktime=worktime;
    }

    public String getName() {
        return name;
    }

    public String getNum() {
        return num;
    }

    public double getWorktime() {
        return worktime;
    }

    public int getPay() {
        return pay;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public void setPay(int pay) {
        this.pay = pay;
    }

    public void setWorktime(double worktime) {
        this.worktime = worktime;
    }

    void count(){
        if(worktime>50){
            addpay=70;
        }
        if(worktime>90){
            addpay=100;
        }
        int sum=pay+addpay;
        System.out.println("my name is "+name+" num is " +
                ""+num+" work "+worktime+" hours " +" pay is "+sum);
    }
}
